<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:p="http://primefaces.org/ui">

<h:head>
	<meta http-equiv='content-type' content='text/html; charset=UTF-8' />
	<title>TravelDream</title>
	<link href='../css/application.css' media='all' rel='stylesheet'
		type='text/css' />
	<script type='text/javascript' src='../css/menu.js' />

<f:metadata>
	<f:viewParam name="id" value="#{go.idPacchettoModificare}" />
</f:metadata>
</h:head>
<h:body onload="javascript:start()">
	<div id="boxintestazione">
		<div id="boxlogo">
			<h:link outcome="/index">
				<img src="../css/v1sinistra.png" />
			</h:link>
		</div>
		<h:form id="boxlandmarktop">
			<div id="boxlandmarktop">

				<h:commandLink action="#{gp.logout}" value="LOGOUT"
					id="textlandmark_left2" rendered="#{gp.loggato()}" />

				<h:link outcome="/user/index" value="Ciao, #{gp.nomeUtente}"
					id="textlandmark_right2" rendered="#{gp.loggato()}" />
			</div>
		</h:form>
	</div>
	<!--/intestazione-->
	<div id="boxlinea1"></div>
	<div id="boxlinea2"></div>
	<div id="boxlinea3"></div>
	<div id="boxlinea4"></div>
	<div id="boxlinea5"></div>
	<div id="boxbig">
		<div id="boxmenu">
			<div id="boxPacchetti">
				<a href="javaScript:menuFunc('boxleft1')">Viaggi</a>
				<ul id="boxleft1">
					<li><h:link outcome="/cittaPacchetti" value="Per Destinazione"
							id="p1"></h:link></li>
					<li><h:link outcome="/prezziPacchetti"
							value="Per tutte le tasche" id="p2"></h:link></li>
					<li><h:link outcome="/tipologiePacchetti"
							value="Quello che fa per te" id="p3"></h:link></li>
				</ul>
			</div>
			<div id="boxHotel">
				<a href="javaScript:menuFunc('boxleft2')">Hotel</a>
				<ul id="boxleft2">
					<li><h:link outcome="/cittaHotel" value="Città"></h:link></li>
					<li><h:link outcome="/prezziHotel" value="Per tutte le tasche"></h:link></li>
				</ul>
			</div>
			<div id="boxLandmark">
				<ul id="boxleft3">
					<li><h:link outcome="/chiSiamo" value="Chi siamo"></h:link></li>
					<li><h:link outcome="/contatti" value="Contatti" id="ultimo"></h:link></li>
				</ul>
			</div>
		</div>
		<div id="boxcontenuto">
			<div>
				<h1><h:outputLabel value="Modifica di #{go.getPacchettoSelezionato().titolo}" /></h1>
				<h:form>
					<h:panelGrid columns="3" id="regGrid1"
						rendered="#{go.primaPaginaVisibile()}">
						<h:outputLabel for="titoloMod">Titolo</h:outputLabel>
						<h:inputText id="titoloMod" value="#{go.titoloMod}" ></h:inputText>
						<p:message for="titoloMod" />

						<h:outputLabel for="descrizioneMod">Descrizione</h:outputLabel>
						<h:inputTextarea id="descrizioneMod" value="#{go.descrizioneMod}"
							cols="50" rows="20" />
						<p:message for="descrizioneMod" />

						<h:outputLabel for="dataAndataMod">Data andata</h:outputLabel>
						<p:calendar value="#{go.dataAndataMod}" id="dataAndataMod" />
						<p:message for="dataAndataMod" />

						<h:outputLabel for="dataRitornoMod">Data ritorno</h:outputLabel>
						<p:calendar value="#{go.dataRitornoMod}" id="dataRitornoMod" />
						<p:message for="dataRitornoMod" />

						<h:outputLabel for="targetMod">Target</h:outputLabel>
						<h:selectOneMenu value="#{go.targetMod}" id="targetMod">
							<f:selectItems value="#{go.targetColPrimoSelezionato()}" var="c"
								itemLabel="#{c}" itemValue="#{c}" />
						</h:selectOneMenu>
						<p:message for="targetMod" />

						<h:outputLabel for="tipologiaMod">Tipologia</h:outputLabel>
						<h:selectOneMenu value="#{go.tipologiaMod}" id="tipologiaMod">
							<f:selectItems value="#{go.tipologiaColPrimoSelezionato()}" var="c"
								itemLabel="#{c}" itemValue="#{c}" />
						</h:selectOneMenu>
						<p:message for="tipologiaMod" />

						<h:commandButton value="Continua" action="#{go.continuaModifica()}"
							rendered="true" />
					</h:panelGrid>


					<h:panelGrid columns="3" id="regGrid2"
						rendered="#{go.secondaPaginaVisibile()}">
						<h:outputLabel for="voloAndataMod">Volo andata</h:outputLabel>
						<h:selectOneMenu value="#{go.voloAndataMod}" id="voloAndataMod">
							<f:selectItems value="#{go.voliPossibiliAndataMod()}" var="c"
								itemLabel="#{c.dataFormattata}" itemValue="#{c.idVolo}" />
						</h:selectOneMenu>
						<p:message for="voloAndataMod" />

						<h:outputLabel for="voloRitornoMod">Volo ritorno</h:outputLabel>
						<h:selectOneMenu value="#{go.voloRitornoMod}" id="voloRitornoMod">
							<f:selectItems value="#{go.voliPossibiliRitornoMod()}" var="c"
								itemLabel="#{c.dataFormattata}" itemValue="#{c.idVolo}" />
						</h:selectOneMenu>
						<p:message for="voloRitornoMod" />

						<h:outputLabel for="pernottamentoMod">Pernottamento</h:outputLabel>
						<h:selectOneMenu value="#{go.idPernottamentoMod}"
							id="pernottamentoMod">
							<f:selectItems value="#{go.pernottamentiPossibiliMod()}" var="c"
								itemLabel="#{c.tipo} - #{ds.getHotelPerId(c.idHotel).nome}, #{ds.getHotelPerId(c.idHotel).indirizzo}"
								itemValue="#{c.idPernottamento}" />
						</h:selectOneMenu>
						<p:message for="pernottamentoMod" />

						<h:outputLabel for="prezzoMod">Prezzo</h:outputLabel>
						<h:inputText id="prezzoMod" value="#{go.prezzoMod}" />
						<p:message for="prezzoMod" />

						<h:outputLabel for="foto1Mod">Foto1</h:outputLabel>
						<h:inputText id="foto1Mod" value="#{go.foto1Mod}" />
						<p:message for="foto1Mod" />

						<h:outputLabel for="foto2Mod">Foto2</h:outputLabel>
						<h:inputText id="foto2Mod" value="#{go.foto2Mod}" />
						<p:message for="foto2Mod" />

						<h:outputLabel for="foto3Mod">Foto3</h:outputLabel>
						<h:inputText id="foto3Mod" value="#{go.foto3Mod}" />
						<p:message for="foto3Mod" />

						<h:outputLabel for="foto4Mod">Foto4</h:outputLabel>
						<h:inputText id="foto4Mod" value="#{go.foto4Mod}" />
						<p:message for="foto4Mod" />

						<h:outputLabel for="foto5Mod">Foto5</h:outputLabel>
						<h:inputText id="foto5Mod" value="#{go.foto5Mod}" />
						<p:message for="foto5Mod" />

						<h:outputLabel for="foto6Mod">Foto6</h:outputLabel>
						<h:inputText id="foto6Mod" value="#{go.foto6Mod}" />
						<p:message for="foto6Mod" />
						
						<h:commandButton value="Modifica e salva" action="#{go.salvaMod()}"
						rendered="true" />
					</h:panelGrid>

					
				</h:form>
			</div>
		</div>
	</div>
	<!--/boxbig-->
</h:body>
</html>
